package com.qujia.fleet.service.impl;

/**
 * @Auther: LogicQin
 * @Date: 2023/5/11 10:31
 * @Description:
 */
import com.qujia.fleet.domain.FleetRechargeDetail;
import com.qujia.fleet.mapper.FleetRechargeDetailMapper;
import com.qujia.fleet.service.FleetRechargeDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class FleetRechargeDetailServiceImpl implements FleetRechargeDetailService {
    private final FleetRechargeDetailMapper fleetRechargeDetailMapper;

    @Autowired
    public FleetRechargeDetailServiceImpl(FleetRechargeDetailMapper fleetRechargeDetailMapper) {
        this.fleetRechargeDetailMapper = fleetRechargeDetailMapper;
    }

    @Override
    public boolean addFleetRechargeDetail(FleetRechargeDetail fleetRechargeDetail) {
        return fleetRechargeDetailMapper.insertFleetRechargeDetail(fleetRechargeDetail) > 0;
    }

    @Override
    public boolean updateFleetRechargeDetail(FleetRechargeDetail fleetRechargeDetail) {
        return fleetRechargeDetailMapper.updateFleetRechargeDetail(fleetRechargeDetail) > 0;
    }

    @Override
    public boolean deleteFleetRechargeDetailById(Integer id) {
        return fleetRechargeDetailMapper.deleteFleetRechargeDetailById(id) > 0;
    }

    @Override
    public FleetRechargeDetail getFleetRechargeDetailById(Integer id) {
        return fleetRechargeDetailMapper.selectFleetRechargeDetailById(id);
    }

    @Override
    public List<FleetRechargeDetail> getAllFleetRechargeDetails() {
        return fleetRechargeDetailMapper.selectAllFleetRechargeDetails();
    }


}
